package ch.creasystem.tennis.playermgmt.entities;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity implementation class for Entity: Player
 *
 */
@Entity 
@Table(name = "player", schema = "tennis")
public class Player implements Serializable {

	/**
	 * UID
	 */
	private static final long serialVersionUID = -5797389455799204546L;

	@Id
	private long id;
	
	private String firstname;
	private String lastname;
	
	@Temporal(TemporalType.DATE)
	private Date birthdate;
	 
	public String getFirstname() {
		return this.firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}   
	public String getLastname() {
		return this.lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getId() {
		return id;
	}
	public Date getBirthdate() {
		return birthdate;
	}
	public void setBirthdate(Date birthdate) {
		this.birthdate = birthdate;
	}
	
	@Override
	public String toString() {
		return "Player [birthdate=" + birthdate + ", firstname=" + firstname
				+ ", id=" + id + ", lastname=" + lastname + "]";
	}
   
}
